package com.sailmi.common.mybatis.mpj;

import java.util.List;
import java.util.Objects;

public class QueryJoinInfo {
    List<String> selectList;
    List<QueryConditionInfo> conditionInfoList;
    List<TableJoinInfo> joinInfoList;

    public String getSelectStr(){
        String res = "";
        if(Objects.nonNull(selectList)){
            final String tmpStr = "";
            selectList.forEach(s -> {
                tmpStr.concat("\"");
                tmpStr.concat(s);
                tmpStr.concat("\"");
                tmpStr.concat(",");
            });
            res = tmpStr;
            if(res.endsWith(",")){
                res = res.substring(0,res.length()-1);
            }
        }
        return res;
    }

    public List<String> getSelectList() {
        return selectList;
    }

    public void setSelectList(List<String> selectList) {
        this.selectList = selectList;
    }

    public List<QueryConditionInfo> getConditionInfoList() {
        return conditionInfoList;
    }

    public void setConditionInfoList(List<QueryConditionInfo> conditionInfoList) {
        this.conditionInfoList = conditionInfoList;
    }

    public List<TableJoinInfo> getJoinInfoList() {
        return joinInfoList;
    }

    public void setJoinInfoList(List<TableJoinInfo> joinInfoList) {
        this.joinInfoList = joinInfoList;
    }
}
